import request from '@/utils/request'
export default {
    // 讲师列表
    getTeacherListPage(current, limit, teacherQuery) {
        return request({
            url: `/teacher/pageTeacherCondition/${current}/${limit}`,
            method: 'post',
            //engineerQuery条件对象，后端使用、requestBody获取数据
            data: teacherQuery //data表示把对象转换为json进行传递到接口里
        })
    },
    //删除
    deletedTeacherId(id) {
        return request({
            url: `/teacher/${id}`,
            method: 'delete',
        })
    },
    //添加
    addTeacher(teacher) {
        return request({
            url: `/teacher/addTeacher/`,
            method: 'post',
            data: teacher
        })
    },
    //根据ID查询工程师
    getTeacherInfo(id) {
        return request({
            url: `/teacher/getTeacher/${id}`,
            method: 'get'
        })
    },
    updateTeacher(teacher) {
        return request({
            url: `/teacher/updateTeacher`,
            method: 'post',
            data: teacher
        })
    }
}